<template>
  <view>
    <button @click="loginPost()">post请求测试</button>
    <button @click="loginGet()">get请求测试</button>
  </view>
</template>

<script>
export default {
  data() {
    return {

    }
  },
  methods: {
    loginPost() {
      this.$u.api.demo.testPost({ data: 1 }).then(res => {
        console.log(res);
      }).catch(err => {
        console.log(err)
      })
    },
    loginGet() {
      this.$u.api.demo.testGet({ data: 1, size: 2 }).then(res => {
        console.log(res);
      }).catch(err => {
        console.log(err)
      })
    }
  }
}
</script>

<style lang="scss">
</style>
